You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLMtxVec Class > TOpenCLMtxVec Methods > PhaseSpectrum Method > TOpenCLMtxVec.PhaseSpectrum Method ([In] TOpenCLMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLMtxVec.PhaseSpectrum Method ([In] TOpenCLMtxVec)

The phase angles (spectrum) of object elements.

Syntax
C#
Visual Basic
public TOpenCLMtxVec PhaseSpectrum([In] TOpenCLMtxVec Vec);

Calculates the phase angles (spectrum) of all Vec object elements. Phase values are returned in radians and are in the range -PI,PI. Size and TOpenCLBase.ComplexComplexproperties of the calling object are set implicitly to match Vec object. The phase angles are calculated from the following equation: 

 

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLVector a,b; clMtxVec.CreateIt(out a, out b); try { a.CopyCplxFromArray( new double[] {1,2,3,-4}); b.PhaseSpectrum(a); // b = [arctan2(1,2), arctan2(3,-4)]; } finally { clMtxVec.FreeIt(ref a, ref b); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!